[][src]Crate multihash

Multihash

Implementation of multihash in Rust.

A Multihash is a structure that contains a hashing algorithm, plus some hashed data. A MultihashRef is the same as a Multihash, except that it doesn't own its data.

Structs

Blake2b256

The Blake2b-256 hasher.

Blake2b512

The Blake2b-512 hasher.

Blake2s128

The Blake2s-128 hasher.

Blake2s256

The Blake2s-256 hasher.

DecodeOwnedError

Error that can happen when decoding some bytes.

Identity

The Identity hasher

Keccak224

The Keccak-224 hasher.

Keccak256

The keccak-256 hasher.

Keccak384

The keccak-384 hasher.

Keccak512

The keccak-512 hasher.

Multihash

Representation of a valid multihash. This enforces validity on construction, so it can be assumed this is always a valid multihash.

MultihashRef

Represents a valid multihash.

Sha1

The Sha1 hasher.

Sha2_256

The Sha2-256 hasher.

Sha2_512

The Sha2-512 hasher.

Sha3_224

The Sha3-224 hasher.

Sha3_256

The Sha3-256

Sha3_384

The Sha3-384 hasher.

Sha3_512

The Sha3-512 hasher.

Enums

Code

The code of Multihash.

DecodeError

Error that can happen when decoding some bytes.

EncodeError

Error that can happen when encoding some bytes into a multihash.

Traits

MultihashDigest

The MultihashDigest trait specifies an interface common for all multihash functions.

Functions

wrap

Wraps a hash digest in Multihash with the given Mutlihash code.